import request from '@/utils/request.js'

//将针对Order的所有请求封装到一个对象里面
const orderApi = {
	list(orderQuery) {
		return request.get('/order/orderInfo/selectByPage',{params: orderQuery})
	},
	deleteById(id) {
		return request.delete( `/order/orderInfo/deleteById/${id}`)
	},
	deleteAll(ids) {
		return request.delete( `/order/orderInfo/deleteAll/${ids}`)
	},
	selectById(id) {
		return request.get(`/order/orderInfo/selectById/${id}`)
	},
	exportExcel() {
		return request({
			url:'/order/orderInfo/exportExcel',
			method:'get',
			responseType: 'blob'
		})
	},
	deliver(id) {
		return request.put(`/order/orderInfo/deliver/${id}`)
	}
}

export default orderApi